import { UploaderService } from '@app/uploader';
import { Injectable } from '@nestjs/common';

@Injectable()
export class UploadService {
    constructor(
        private readonly uploader:UploaderService,
    ) {}



    async upload(file:Express.Multer.File, memberId:number) {
        try {
            return this.uploader.put(file, memberId)
        } catch (error) {
            console.log(error.message)
        }

        return null
    }

    async del(file:string) {
        try {
            this.uploader.delFile(file)
        } catch (error) {
            
        }
    }
}
